<% layout("/common/layout.html",{"title":"工商资料打印"}){ %>
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-8">
        <h2>食药资料打印</h2>
        <ol class="breadcrumb">
            <li><a href="${ctxPath}/admin/main">主页</a></li>
            <li><a href="../view/index">食药申请列表</a></li>
            <li class="active">资料打印</li>
        </ol>
    </div>
    <div class="col-sm-4">
        <div class="title-action">
            <div class="btn-group">
                <a class="btn btn-primary btn-outline" href="index"><i class="fa fa-reply"> </i> 返回列表</a>
            </div>
        </div>
    </div>
</div>

<div class="wrapper wrapper-content">
    <div class="tabs-container" id="tabs-container">
        <ul class="nav nav-tabs">
            <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">营业执照</a></li>
            <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">租赁合同</a></li>
            <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">布局图</a></li>
            <li class=""><a data-toggle="tab" href="#tab-4" aria-expanded="false">操作流程方位图</a></li>
            <li class=""><a data-toggle="tab" href="#tab-5" aria-expanded="false">方位图</a></li>
            <li class=""><a data-toggle="tab" href="#tab-6" aria-expanded="false">食品安全管理制度</a></li>
            <li class=""><a data-toggle="tab" href="#tab-7" aria-expanded="false">食品经营许可证申请表</a></li>
        </ul>
        <div class="tab-content">
            <div id="tab-1" class="tab-pane active">
                <div class="panel-body">
                    <div class="table-responsive col-sm-7">
                        <h3 class="text-center"><a class="btn btn-primary btn-sm btn-outline" id="companyLicense"><i class="fa fa-print"></i>&nbsp;打印营业执照</a></h3>
                         <form id="companyLicense_content" style="text-align: center;">
                         	<% if(isNotEmpty(companyLicenseList)){ for(companyLicensepic in
						companyLicenseList){ %>
							<img	src="${uploaderFilesDomain!}${companyLicensepic!'/static/images/nopic.jpg'}"
								class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
						<% } } %>
						</form>
                    </div>
                </div>
            </div>

			<div id="tab-2" class="tab-pane">
				<div class="panel-body">
					<div class="table-responsive col-sm-7">
						<h3 class="text-center">
							<a class="btn btn-primary btn-sm btn-outline"
								id="rentalContract"><i class="fa fa-print"></i>&nbsp;打印租赁合同</a>
						</h3>
						  <form id="rentalContract_content" style="text-align: center;">
						<% if(isNotEmpty(rentalContractList)){ for(rentalContractpic in
						rentalContractList){ %> <img
							src="${uploaderFilesDomain!}${rentalContractpic!'/static/images/nopic.jpg'}"
							class="img-thumbnail" title="点击查看大图" alt="点击查看大图"> <% } }
						%>
						</form>
					</div>
				</div>
			</div>

			<div id="tab-3" class="tab-pane">
				<div class="panel-body">
					<div class="table-responsive col-sm-7">
						<h3 class="text-center">
							<a class="btn btn-primary btn-sm btn-outline" id="layout"><i
								class="fa fa-print"></i>&nbsp;打印布局图</a>
						</h3>
						  <form id="layout_content" style="text-align: center;">
						<% if(isNotEmpty(layoutList)){ for(layoutpic in layoutList){ %> <img
							src="${uploaderFilesDomain!}${layoutpic!'/static/images/nopic.jpg'}"
							class="img-thumbnail" title="点击查看大图" alt="点击查看大图"> <% } }
						%>
						</form>
					</div>
				</div>
			</div>

			<div id="tab-4" class="tab-pane">
				<div class="panel-body">
					<div class="table-responsive col-sm-7">
						<h3 class="text-center">
							<a class="btn btn-primary btn-sm btn-outline" id="operatingProcedures"><i
								class="fa fa-print"></i>&nbsp;打印操作流程</a>
						</h3>
						 <form id="operatingProcedures_content" style="text-align: center;">
						<% if(isNotEmpty(operatingProceduresList)){
						for(operatingProcedurespic in operatingProceduresList){ %> <img
							src="${uploaderFilesDomain!}${operatingProcedurespic!'/static/images/nopic.jpg'}"
							class="img-thumbnail" title="点击查看大图" alt="点击查看大图"> <% } }
						%>
						</form>
					</div>
				</div>
			</div>

			<div id="tab-5" class="tab-pane">
				<div class="panel-body">
					<div class="table-responsive col-sm-7">
						<h3 class="text-center">
							<a class="btn btn-primary btn-sm btn-outline" id="orientationMap"><i
								class="fa fa-print"></i>&nbsp;打印方位图</a>
						</h3>
						 <form id="orientationMap_content" style="text-align: center;">
						<% if(isNotEmpty(orientationMapList)){ for(orientationMappic in
						orientationMapList){ %> <img
							src="${uploaderFilesDomain!}${orientationMappic!'/static/images/nopic.jpg'}"
							class="img-thumbnail" title="点击查看大图" alt="点击查看大图"> <% } }
						%>
						</form>
					</div>
				</div>
			</div>

			<div id="tab-6" class="tab-pane">
                <div class="panel-body">
				 	<div class="table-responsive" style="layout-grid: 15.6pt;margin:0 auto; width:600px;">
						<h3 class="text-center">
							<a class="btn btn-primary btn-sm btn-outline" id="managerRlues"><i
								class="fa fa-print"></i>&nbsp;食品安全管理制度</a>
						</h3>
						 <div id="managerRlues_content">
						    <% include("/fooddrug/manageRules.html"){} %>
						</div>
					</div>
                </div>
            </div>
            
            
            <% directive dynamic license;%>

			<div id="tab-7" class="tab-pane">
				<div class="panel-body">
					<div class="table-responsive" style="layout-grid: 15.6pt;margin:0 auto; width:800px;">
					  <h3 class="text-center">
							<a class="btn btn-primary btn-sm btn-outline" id="license"><i
								class="fa fa-print"></i>&nbsp;打印食品经营许可证申请表</a>
						</h3>	
					<form id="license_content" style="width: 800px;">
							<h1 align="center">《食品经营许可证》申请表</h1>
							<table class="table">
								<tr>
									<td colspan="1">经营者名称</td>
									<td colspan="3"></td>
								</tr>
								<tr>
									<td colspan="1">社会信用代码<br> （身份证号码）
									</td>
									<td colspan="3"></td>
								</tr>
								<tr>
									<td colspan="1">住所</td>
									<td colspan="3"></td>
								</tr>
								<tr>
									<td>经营场所</td>
									<td>${license.premises}</td>
									<td>经营场所面积</td>
									<td>${license.businessArea}</td>
								</tr>
								<tr>
									<td colspan="1">仓库地址（如有）</td>
									<td colspan="3"></td>
								</tr>
								<tr>
									<td colspan="1">主体业态</td>
									<td colspan="3" align="left">
									 <input type="checkbox" value="1">食品销售经营者<br>
									  <input type="checkbox" value="2">餐饮服务经营者<br>
									   <input type="checkbox" value="3">单位食堂<br>
									</td>
								</tr>
								<tr>
									<td colspan="1" rowspan="3">经营类别</td>
									<td colspan="3" rowspan="3" align="left">
									  <% if(isNotEmpty(businessCategoryList)){ for(cate in businessCategoryList){ %>
									      <input type="checkbox" value="${cate.key}">${cate.text}<br>
									    <% }}%></td>
								</tr>
								<!-- <tr>
									<td colspan="3" rowspan="1" align="left"></td>
								</tr>
								<tr>
									<td colspan="3" rowspan="1" align="left"></td>
								</tr> -->
							</table>
							<div STYLE="page-break-after: always;"></div>
							<p>
							<table class="table">
								<tr>
									<td colspan="1">经营项目</td>
									<td colspan="3" align="left">
									    <% if(isNotEmpty(businessProjectMap)){ for(project in businessProjectMap){ %>
									      <input type="checkbox" value="${project.key}">${project.value}<br>
									    <% }}%>
									           备注：<br>
										如申请散装食品销售，是否含散装熟食销售 <input type="radio"
										${license.cookedFood!=null && license.cookedFood==1?
										"checked"} class="szss" />是 <input type="radio"
										${license.cookedFood!=null && license.cookedFood==0?
										"checked"} class="szss" />否; <br> 如申请自制饮料制售，是否含自制酒 <input
										type="radio" ${license.bomemadeWine!=null
										&& license.bomemadeWine==1? "checked"}  class="szss" />是 <input
										type="radio" ${license.bomemadeWine!=null
										&& license.bomemadeWine==0? "checked"} class="szss" />否; <br>
										如申请糕点类食品制售，是否含裱花蛋糕 <input type="radio"
										${license.decoratingCake!=null && license.decoratingCake==1?
										"checked"} class="szss" />是 <input type="radio"
										${license.decoratingCake!=null && license.decoratingCake==0?
										"checked"}" class="szss" />否; <br> 如申请自制饮品制售，是否含现制现售生鲜乳 <input
										type="radio" ${license.freshMilk!=null
										&& license.freshMilk==1? "checked"} class="szss" />是 <input
										type="radio" ${license.freshMilk!=null
										&& license.freshMilk==0? "checked"} class="szss" />否; <br></td>
								</tr>
								<tr>
								<tr>
									<td>申请副本数（分）</td>
									<td></td>
									<td>有效期（年）</td>
									<td></td>
								</tr>
								<tr>
									<td colspan="1">经营性质</td>
									<td colspan="3">
									<input type="checkbox" ${license.businessNature==1? "checked"}/>企业
									<input type="checkbox" ${license.businessNature==2? "checked"}/>个体工商户
									<input type="checkbox" ${license.businessNature==3? "checked"}/>农民专业合作社 
									<input type="checkbox" ${license.businessNature==4? "checked"}/>其他</td>
								</tr>
								<td>职工人数（人）</td>
								<td></td>
								<td>应体检人数（人）</td>
								<td></td>
								</tr>
								</tr>
								<td>邮政编码</td>
								<td></td>
								<td>E-mail</td>
								<td></td>
								</tr>
								<tr>
									<td colspan="4">
										<p align="center">保证声明</p> <p>申请人保证：本申请书中所填的内容及所附的资料均真实、合法。如有不实之处，本人（单位）愿负相应的法律责任，并承担由此产生的一切后果。
										</p> <br> <span>申请人（签名）：</span> <span
										style="margin-left: 200px">法定代表人（负责人或业主）（签名）：</span></p>
												<br>
												<p> <br></br> <span style="margin-left: 500px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日</span>
												</p>
									</td>
								</tr>
							</table>
					</form>
					</div>
				</div>
			</div>
			
			

        </div>
    </div>
</div>
<% } %>
<style media="print">
  @page {
   size: auto;
   margin: 0mm;
  }
 </style>
<script type="text/javascript">
    //页面JS调用
    require(['fooddrug/apply'], function (apply) {
        apply.print();;
    });
</script>
<style>
.table{  
    width:750px;    
    border:2px solid #000;  
    border-collapse: collapse;  
    text-align:center;  
    table-layout: fixed;
    margin-left: 22px;
}  
.table  td{
    height:30px;
    border:1px solid ;  
}    
</style>
